﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using P = Priest.PriestSettings;
using PD = Priest.PriestSettingsDisc;

namespace Priest
{
    public partial class PriestGui : Form
    {
        private static string comboSelectPause;
        private static string comboSelectAoe;
        private static string comboSelectManual;
        private static string comboSelectCooldown;
        private static string comboSelectStopDispel;
        private static string comboSelectStopPurify;

        public PriestGui()
        {
            InitializeComponent();

            #region checkboxes
            checkBox1.Checked = P.myPrefs.AutoMovement;
            checkBox2.Checked = P.myPrefs.AutoTargeting;
            checkBox3.Checked = P.myPrefs.AutoFacing;
            checkBox4.Checked = P.myPrefs.AutoMovementDisable;
            checkBox5.Checked = P.myPrefs.AutoTargetingDisable;
            checkBox6.Checked = P.myPrefs.AutoFacingDisable;
            checkBox7.Checked = P.myPrefs.FlaskOraliusCrystal;
            checkBox8.Checked = P.myPrefs.FlaskCrystal;
            checkBox9.Checked = P.myPrefs.FlaskAlchemy;
            checkBox10.Checked = P.myPrefs.Trinket2Use;
            checkBox11.Checked = P.myPrefs.PrintRaidstyleMsg;
            checkBox12.Checked = P.myPrefs.AutoInterrupt;
            checkBox13.Checked = P.myPrefs.FiendAsDps;
            checkBox14.Checked = P.myPrefs.Trinket1Use;
            checkBox15.Checked = P.myPrefs.FiendAsMana;
            checkBox16.Checked = P.myPrefs.AutoDispel;
            checkBox17.Checked = P.myPrefs.keepRenewOnTanks500;
            checkBox18.Checked = P.myPrefs.keepRenewOnTanks510;
            checkBox19.Checked = P.myPrefs.keepRenewOnTanks520;
            checkBox20.Checked = P.myPrefs.AutoGuardianOnTank;
            checkBox21.Checked = P.myPrefs.AutoHolyDispel;
            checkBox22.Checked = P.myPrefs.AutoHolyPurify;
            checkBox23.Checked = PD.myPrefs.BarrierAutoUse;
            checkBox24.Checked = PD.myPrefs.PainAutoUse;
            checkBox25.Checked = PD.myPrefs.AutoDispel;
            checkBox26.Checked = PD.myPrefs.AutoPurify;
            checkBox28.Checked = PD.myPrefs.PenanceHealingOnly;

            #endregion

            #region numupdown
            numericUpDown1.Value = new decimal(P.myPrefs.PercentPowerWordShield);
            numericUpDown2.Value = new decimal(P.myPrefs.PercentRenewCombat);
            numericUpDown3.Value = new decimal(P.myPrefs.FoodHPOoC);
            numericUpDown4.Value = new decimal(P.myPrefs.FoodManaOoC);
            numericUpDown5.Value = new decimal(P.myPrefs.PercentRenewOoC);
            numericUpDown7.Value = new decimal(P.myPrefs.PercentTrinket2Mana);
            numericUpDown6.Value = new decimal(P.myPrefs.PercentTrinket1HP);
            numericUpDown8.Value = new decimal(P.myPrefs.PercentTrinket2Energy);
            numericUpDown9.Value = new decimal(P.myPrefs.PercentTrinket2HP);
            numericUpDown10.Value = new decimal(P.myPrefs.PercentTrinket1Energy);
            numericUpDown11.Value = new decimal(P.myPrefs.PercentTrinket1Mana);
            numericUpDown12.Value = new decimal(P.myPrefs.MindSearAdds);
            numericUpDown13.Value = new decimal(P.myPrefs.PercentFlashHealOoC);
            numericUpDown14.Value = new decimal(P.myPrefs.PercentFlashHealCombat);
            numericUpDown15.Value = new decimal(P.myPrefs.PercentFiendMana);
            numericUpDown16.Value = new decimal(P.myPrefs.HaloAdds);
            numericUpDown17.Value = new decimal(P.myPrefs.DivineStarAdds);
            numericUpDown18.Value = new decimal(P.myPrefs.CascadeAdds);
            numericUpDown19.Value = new decimal(P.myPrefs.PercentNaaru);
            numericUpDown20.Value = new decimal(P.myPrefs.PercentVampiricEmbrace);
            numericUpDown21.Value = new decimal(P.myPrefs.VoidTendrilAdds);
            numericUpDown22.Value = new decimal(P.myPrefs.PsychicScreamAdds);
            numericUpDown23.Value = new decimal(P.myPrefs.PercentDispersion);
            numericUpDown24.Value = new decimal(P.myPrefs.PercentDesperatePrayer);
            numericUpDown27.Value = new decimal(P.myPrefs.percentRenew500);
            numericUpDown28.Value = new decimal(P.myPrefs.percentRenew510);
            numericUpDown29.Value = new decimal(P.myPrefs.percentRenew520);
            numericUpDown30.Value = new decimal(P.myPrefs.percentManaMindbender500);
            numericUpDown31.Value = new decimal(P.myPrefs.percentManaMindbender510);
            numericUpDown32.Value = new decimal(P.myPrefs.percentManaMindbender520);
            numericUpDown33.Value = new decimal(P.myPrefs.percentBindingHeal500);
            numericUpDown34.Value = new decimal(P.myPrefs.percentBindingHeal510);
            numericUpDown35.Value = new decimal(P.myPrefs.percentBindingHeal520);
            numericUpDown36.Value = new decimal(P.myPrefs.percentPrayerOfMending500);
            numericUpDown37.Value = new decimal(P.myPrefs.percentPrayerOfMending510);
            numericUpDown38.Value = new decimal(P.myPrefs.percentPrayerOfMending520);
            numericUpDown39.Value = new decimal(P.myPrefs.percentHeal500);
            numericUpDown40.Value = new decimal(P.myPrefs.percentHeal510);
            numericUpDown41.Value = new decimal(P.myPrefs.percentHeal520);
            numericUpDown42.Value = new decimal(P.myPrefs.percentFlashHeal500);
            numericUpDown43.Value = new decimal(P.myPrefs.percentFlashHeal510);
            numericUpDown44.Value = new decimal(P.myPrefs.percentFlashHeal520);
            numericUpDown25.Value = new decimal(P.myPrefs.percentCircleOfHealing500);
            numericUpDown26.Value = new decimal(P.myPrefs.percentCircleOfHealing510);
            numericUpDown45.Value = new decimal(P.myPrefs.percentCircleOfHealing520);
            numericUpDown46.Value = new decimal(P.myPrefs.CircleOfHealingPlayers500);
            numericUpDown47.Value = new decimal(P.myPrefs.CircleOfHealingPlayers510);
            numericUpDown48.Value = new decimal(P.myPrefs.CircleOfHealingPlayers520);
            numericUpDown49.Value = new decimal(P.myPrefs.percentPrayerOfHealing500);
            numericUpDown50.Value = new decimal(P.myPrefs.percentPrayerOfHealing510);
            numericUpDown51.Value = new decimal(P.myPrefs.percentPrayerOfHealing520);
            numericUpDown52.Value = new decimal(P.myPrefs.PrayerOfHealingPlayers500);
            numericUpDown53.Value = new decimal(P.myPrefs.PrayerOfHealingPlayers510);
            numericUpDown54.Value = new decimal(P.myPrefs.PrayerOfHealingPlayers520);
            numericUpDown55.Value = new decimal(P.myPrefs.percentDivineHymn500);
            numericUpDown56.Value = new decimal(P.myPrefs.percentDivineHymn510);
            numericUpDown57.Value = new decimal(P.myPrefs.percentDivineHymn520);
            numericUpDown58.Value = new decimal(P.myPrefs.DivineHymnPlayers500);
            numericUpDown59.Value = new decimal(P.myPrefs.DivineHymnPlayers510);
            numericUpDown60.Value = new decimal(P.myPrefs.DivineHymnPlayers520);
            numericUpDown61.Value = new decimal(P.myPrefs.percentGuardianSpiritTank);
            numericUpDown62.Value = new decimal(P.myPrefs.PercentSolace);
            numericUpDown63.Value = new decimal(PD.myPrefs.UseAtonementManaPercent);
            numericUpDown64.Value = new decimal(PD.myPrefs.PwsTanks);
            numericUpDown65.Value = new decimal(PD.myPrefs.PwsHealers);
            numericUpDown66.Value = new decimal(PD.myPrefs.PwsDamage);
            numericUpDown67.Value = new decimal(PD.myPrefs.PenanceDamage);
            numericUpDown68.Value = new decimal(PD.myPrefs.PenanceHealers);
            numericUpDown69.Value = new decimal(PD.myPrefs.PenanceTanks);
            numericUpDown70.Value = new decimal(PD.myPrefs.MendingDamage);
            numericUpDown71.Value = new decimal(PD.myPrefs.MendingHealers);
            numericUpDown72.Value = new decimal(PD.myPrefs.MendingTanks);
            numericUpDown73.Value = new decimal(PD.myPrefs.PrayerOfHealingPercent);
            numericUpDown74.Value = new decimal(PD.myPrefs.PrayerOfHealingPlayerCount);
            numericUpDown75.Value = new decimal(PD.myPrefs.BarrierPercent);
            numericUpDown76.Value = new decimal(PD.myPrefs.BarrierPlayerCount);
            numericUpDown77.Value = new decimal(PD.myPrefs.PainPercent);
            numericUpDown78.Value = new decimal(PD.myPrefs.HolyNovaPercent);
            numericUpDown79.Value = new decimal(PD.myPrefs.HolyNovaPlayerCount);
            numericUpDown80.Value = new decimal(PD.myPrefs.ManaRegenPercent);
            numericUpDown81.Value = new decimal(PD.myPrefs.HealTanks);
            numericUpDown82.Value = new decimal(PD.myPrefs.HealHealers);
            numericUpDown83.Value = new decimal(PD.myPrefs.HealDamage);
            numericUpDown84.Value = new decimal(PD.myPrefs.FlashHealTanks);
            numericUpDown85.Value = new decimal(PD.myPrefs.FlashHealHealers);
            numericUpDown86.Value = new decimal(PD.myPrefs.FlashHealDamage);
            numericUpDown87.Value = new decimal(PD.myPrefs.ArchangelStacks);
            numericUpDown88.Value = new decimal(PD.myPrefs.CascadeHealth);
            numericUpDown89.Value = new decimal(PD.myPrefs.CascadePlayerCount);
            numericUpDown90.Value = new decimal(PD.myPrefs.DesperatePrayerPercent);
            numericUpDown91.Value = new decimal(PD.myPrefs.GiftOfTheNaaruPercent);

            #endregion

            #region radiobuttons
            if(P.myPrefs.buttonChakraSanctuary500) btnChakraSanctuary500.Checked = true;
            if (P.myPrefs.buttonChakraSanctuary510) btnChakraSanctuary510.Checked = true;
            if (P.myPrefs.buttonChakraSanctuary520) btnChakraSanctuary520.Checked = true;
            if (P.myPrefs.buttonChakraSernenity500) btnChakraSernenity500.Checked = true;
            if (P.myPrefs.buttonChakraSernenity510) btnChakraSernenity510.Checked = true;
            if (P.myPrefs.buttonChakraSernenity520) btnChakraSernenity520.Checked = true;
            if (P.myPrefs.buttonMindbender500) btnMindbender500.Checked = true;
            if (P.myPrefs.buttonMindbender510) btnMindbender510.Checked = true;
            if (P.myPrefs.buttonMindbender520) btnMindbender520.Checked = true;
            if (PD.myPrefs.UseAtonement == 0) btnAtonementNo.Checked = true;
            if (PD.myPrefs.UseAtonement == 1) btnAtonementYes.Checked = true;
            if (PD.myPrefs.ManaRegen == 0) radioButton14.Checked = true;
            if (PD.myPrefs.ManaRegen == 1) radioButton13.Checked = true;
            if (PD.myPrefs.ManaRegen == 2) radioButton15.Checked = true;

            #endregion

            #region trinkets
            if (P.myPrefs.Trinket1 == 1) radioButton1.Checked = true;
            if (P.myPrefs.Trinket1 == 2) radioButton2.Checked = true;
            if (P.myPrefs.Trinket1 == 3) radioButton3.Checked = true;
            if (P.myPrefs.Trinket1 == 4) radioButton4.Checked = true;
            if (P.myPrefs.Trinket1 == 5) radioButton5.Checked = true;
            if (P.myPrefs.Trinket1 == 6) radioButton6.Checked = true;
            if (P.myPrefs.Trinket2 == 1) radioButton12.Checked = true;
            if (P.myPrefs.Trinket2 == 2) radioButton11.Checked = true;
            if (P.myPrefs.Trinket2 == 3) radioButton10.Checked = true;
            if (P.myPrefs.Trinket2 == 4) radioButton9.Checked = true;
            if (P.myPrefs.Trinket2 == 5) radioButton8.Checked = true;
            if (P.myPrefs.Trinket2 == 6) radioButton7.Checked = true;
            #endregion

            #region modifier keys
            comboSelectCooldown = P.myPrefs.ModifkeyCooldowns;
            if (comboSelectCooldown == "Alt") cmbUseCooldownsModifier.SelectedIndex = 0;
            if (comboSelectCooldown == "Ctrl") cmbUseCooldownsModifier.SelectedIndex = 1;
            if (comboSelectCooldown == "Shift") cmbUseCooldownsModifier.SelectedIndex = 2;
            if (comboSelectCooldown == "Windows") cmbUseCooldownsModifier.SelectedIndex = 3;

            comboSelectPause = P.myPrefs.ModifkeyPause;
            if (comboSelectPause == "Alt") cmbPauseCRModifier.SelectedIndex = 0;
            if (comboSelectPause == "Ctrl") cmbPauseCRModifier.SelectedIndex = 1;
            if (comboSelectPause == "Shift") cmbPauseCRModifier.SelectedIndex = 2;
            if (comboSelectPause == "Windows") cmbPauseCRModifier.SelectedIndex = 3;

            comboSelectAoe = P.myPrefs.ModifkeyStopAoe;
            if (comboSelectAoe == "Alt") cmbStopAoeModifier.SelectedIndex = 0;
            if (comboSelectAoe == "Ctrl") cmbStopAoeModifier.SelectedIndex = 1;
            if (comboSelectAoe == "Shift") cmbStopAoeModifier.SelectedIndex = 2;
            if (comboSelectAoe == "Windows") cmbStopAoeModifier.SelectedIndex = 3;

            comboSelectManual = P.myPrefs.ModifkeyPlayManual;
            if (comboSelectManual == "Alt") cmbPlayManualModifier.SelectedIndex = 0;
            if (comboSelectManual == "Ctrl") cmbPlayManualModifier.SelectedIndex = 1;
            if (comboSelectManual == "Shift") cmbPlayManualModifier.SelectedIndex = 2;
            if (comboSelectManual == "Windows") cmbPlayManualModifier.SelectedIndex = 3;

            comboSelectStopDispel = P.myPrefs.ModifkeyStopDispel;
            if (comboSelectStopDispel == "Alt") comboBox1.SelectedIndex = 0;
            if (comboSelectStopDispel == "Ctrl") comboBox1.SelectedIndex = 1;
            if (comboSelectStopDispel == "Shift") comboBox1.SelectedIndex = 2;
            if (comboSelectStopDispel == "Windows") comboBox1.SelectedIndex = 3;

            comboSelectStopPurify = P.myPrefs.ModifkeyStopPurify;
            if (comboSelectStopPurify == "Alt") comboBox3.SelectedIndex = 0;
            if (comboSelectStopPurify == "Ctrl") comboBox3.SelectedIndex = 1;
            if (comboSelectStopPurify == "Shift") comboBox3.SelectedIndex = 2;
            if (comboSelectStopPurify == "Windows") comboBox3.SelectedIndex = 3;
            #endregion

            #region combobox HOTKEYS
            //cooldowns
            if (P.myPrefs.KeyUseCooldowns == Keys.None) cmbUseCooldowns.SelectedIndex = 0;
            if (P.myPrefs.KeyUseCooldowns == Keys.A) cmbUseCooldowns.SelectedIndex = 1;
            if (P.myPrefs.KeyUseCooldowns == Keys.B) cmbUseCooldowns.SelectedIndex = 2;
            if (P.myPrefs.KeyUseCooldowns == Keys.C) cmbUseCooldowns.SelectedIndex = 3;
            if (P.myPrefs.KeyUseCooldowns == Keys.D) cmbUseCooldowns.SelectedIndex = 4;
            if (P.myPrefs.KeyUseCooldowns == Keys.E) cmbUseCooldowns.SelectedIndex = 5;
            if (P.myPrefs.KeyUseCooldowns == Keys.F) cmbUseCooldowns.SelectedIndex = 6;
            if (P.myPrefs.KeyUseCooldowns == Keys.G) cmbUseCooldowns.SelectedIndex = 7;
            if (P.myPrefs.KeyUseCooldowns == Keys.H) cmbUseCooldowns.SelectedIndex = 8;
            if (P.myPrefs.KeyUseCooldowns == Keys.I) cmbUseCooldowns.SelectedIndex = 9;
            if (P.myPrefs.KeyUseCooldowns == Keys.J) cmbUseCooldowns.SelectedIndex = 10;
            if (P.myPrefs.KeyUseCooldowns == Keys.K) cmbUseCooldowns.SelectedIndex = 11;
            if (P.myPrefs.KeyUseCooldowns == Keys.L) cmbUseCooldowns.SelectedIndex = 12;
            if (P.myPrefs.KeyUseCooldowns == Keys.M) cmbUseCooldowns.SelectedIndex = 13;
            if (P.myPrefs.KeyUseCooldowns == Keys.N) cmbUseCooldowns.SelectedIndex = 14;
            if (P.myPrefs.KeyUseCooldowns == Keys.O) cmbUseCooldowns.SelectedIndex = 15;
            if (P.myPrefs.KeyUseCooldowns == Keys.P) cmbUseCooldowns.SelectedIndex = 16;
            if (P.myPrefs.KeyUseCooldowns == Keys.Q) cmbUseCooldowns.SelectedIndex = 17;
            if (P.myPrefs.KeyUseCooldowns == Keys.R) cmbUseCooldowns.SelectedIndex = 18;
            if (P.myPrefs.KeyUseCooldowns == Keys.S) cmbUseCooldowns.SelectedIndex = 19;
            if (P.myPrefs.KeyUseCooldowns == Keys.T) cmbUseCooldowns.SelectedIndex = 20;
            if (P.myPrefs.KeyUseCooldowns == Keys.U) cmbUseCooldowns.SelectedIndex = 21;
            if (P.myPrefs.KeyUseCooldowns == Keys.V) cmbUseCooldowns.SelectedIndex = 22;
            if (P.myPrefs.KeyUseCooldowns == Keys.W) cmbUseCooldowns.SelectedIndex = 23;
            if (P.myPrefs.KeyUseCooldowns == Keys.X) cmbUseCooldowns.SelectedIndex = 24;
            if (P.myPrefs.KeyUseCooldowns == Keys.Y) cmbUseCooldowns.SelectedIndex = 25;
            if (P.myPrefs.KeyUseCooldowns == Keys.Z) cmbUseCooldowns.SelectedIndex = 26;
            //pause
            if (P.myPrefs.KeyPauseCR == Keys.None) cmbPauseCR.SelectedIndex = 0;
            if (P.myPrefs.KeyPauseCR == Keys.A) cmbPauseCR.SelectedIndex = 1;
            if (P.myPrefs.KeyPauseCR == Keys.B) cmbPauseCR.SelectedIndex = 2;
            if (P.myPrefs.KeyPauseCR == Keys.C) cmbPauseCR.SelectedIndex = 3;
            if (P.myPrefs.KeyPauseCR == Keys.D) cmbPauseCR.SelectedIndex = 4;
            if (P.myPrefs.KeyPauseCR == Keys.E) cmbPauseCR.SelectedIndex = 5;
            if (P.myPrefs.KeyPauseCR == Keys.F) cmbPauseCR.SelectedIndex = 6;
            if (P.myPrefs.KeyPauseCR == Keys.G) cmbPauseCR.SelectedIndex = 7;
            if (P.myPrefs.KeyPauseCR == Keys.H) cmbPauseCR.SelectedIndex = 8;
            if (P.myPrefs.KeyPauseCR == Keys.I) cmbPauseCR.SelectedIndex = 9;
            if (P.myPrefs.KeyPauseCR == Keys.J) cmbPauseCR.SelectedIndex = 10;
            if (P.myPrefs.KeyPauseCR == Keys.K) cmbPauseCR.SelectedIndex = 11;
            if (P.myPrefs.KeyPauseCR == Keys.L) cmbPauseCR.SelectedIndex = 12;
            if (P.myPrefs.KeyPauseCR == Keys.M) cmbPauseCR.SelectedIndex = 13;
            if (P.myPrefs.KeyPauseCR == Keys.N) cmbPauseCR.SelectedIndex = 14;
            if (P.myPrefs.KeyPauseCR == Keys.O) cmbPauseCR.SelectedIndex = 15;
            if (P.myPrefs.KeyPauseCR == Keys.P) cmbPauseCR.SelectedIndex = 16;
            if (P.myPrefs.KeyPauseCR == Keys.Q) cmbPauseCR.SelectedIndex = 17;
            if (P.myPrefs.KeyPauseCR == Keys.R) cmbPauseCR.SelectedIndex = 18;
            if (P.myPrefs.KeyPauseCR == Keys.S) cmbPauseCR.SelectedIndex = 19;
            if (P.myPrefs.KeyPauseCR == Keys.T) cmbPauseCR.SelectedIndex = 20;
            if (P.myPrefs.KeyPauseCR == Keys.U) cmbPauseCR.SelectedIndex = 21;
            if (P.myPrefs.KeyPauseCR == Keys.V) cmbPauseCR.SelectedIndex = 22;
            if (P.myPrefs.KeyPauseCR == Keys.W) cmbPauseCR.SelectedIndex = 23;
            if (P.myPrefs.KeyPauseCR == Keys.X) cmbPauseCR.SelectedIndex = 24;
            if (P.myPrefs.KeyPauseCR == Keys.Y) cmbPauseCR.SelectedIndex = 25;
            if (P.myPrefs.KeyPauseCR == Keys.Z) cmbPauseCR.SelectedIndex = 26;
            //stopAoe
            if (P.myPrefs.KeyStopAoe == Keys.None) cmbStopAoe.SelectedIndex = 0;
            if (P.myPrefs.KeyStopAoe == Keys.A) cmbStopAoe.SelectedIndex = 1;
            if (P.myPrefs.KeyStopAoe == Keys.B) cmbStopAoe.SelectedIndex = 2;
            if (P.myPrefs.KeyStopAoe == Keys.C) cmbStopAoe.SelectedIndex = 3;
            if (P.myPrefs.KeyStopAoe == Keys.D) cmbStopAoe.SelectedIndex = 4;
            if (P.myPrefs.KeyStopAoe == Keys.E) cmbStopAoe.SelectedIndex = 5;
            if (P.myPrefs.KeyStopAoe == Keys.F) cmbStopAoe.SelectedIndex = 6;
            if (P.myPrefs.KeyStopAoe == Keys.G) cmbStopAoe.SelectedIndex = 7;
            if (P.myPrefs.KeyStopAoe == Keys.H) cmbStopAoe.SelectedIndex = 8;
            if (P.myPrefs.KeyStopAoe == Keys.I) cmbStopAoe.SelectedIndex = 9;
            if (P.myPrefs.KeyStopAoe == Keys.J) cmbStopAoe.SelectedIndex = 10;
            if (P.myPrefs.KeyStopAoe == Keys.K) cmbStopAoe.SelectedIndex = 11;
            if (P.myPrefs.KeyStopAoe == Keys.L) cmbStopAoe.SelectedIndex = 12;
            if (P.myPrefs.KeyStopAoe == Keys.M) cmbStopAoe.SelectedIndex = 13;
            if (P.myPrefs.KeyStopAoe == Keys.N) cmbStopAoe.SelectedIndex = 14;
            if (P.myPrefs.KeyStopAoe == Keys.O) cmbStopAoe.SelectedIndex = 15;
            if (P.myPrefs.KeyStopAoe == Keys.P) cmbStopAoe.SelectedIndex = 16;
            if (P.myPrefs.KeyStopAoe == Keys.Q) cmbStopAoe.SelectedIndex = 17;
            if (P.myPrefs.KeyStopAoe == Keys.R) cmbStopAoe.SelectedIndex = 18;
            if (P.myPrefs.KeyStopAoe == Keys.S) cmbStopAoe.SelectedIndex = 19;
            if (P.myPrefs.KeyStopAoe == Keys.T) cmbStopAoe.SelectedIndex = 20;
            if (P.myPrefs.KeyStopAoe == Keys.U) cmbStopAoe.SelectedIndex = 21;
            if (P.myPrefs.KeyStopAoe == Keys.V) cmbStopAoe.SelectedIndex = 22;
            if (P.myPrefs.KeyStopAoe == Keys.W) cmbStopAoe.SelectedIndex = 23;
            if (P.myPrefs.KeyStopAoe == Keys.X) cmbStopAoe.SelectedIndex = 24;
            if (P.myPrefs.KeyStopAoe == Keys.Y) cmbStopAoe.SelectedIndex = 25;
            if (P.myPrefs.KeyStopAoe == Keys.Z) cmbStopAoe.SelectedIndex = 26;
            //play manual
            if (P.myPrefs.KeyPlayManual == Keys.None) cmbPlayManual.SelectedIndex = 0;
            if (P.myPrefs.KeyPlayManual == Keys.A) cmbPlayManual.SelectedIndex = 1;
            if (P.myPrefs.KeyPlayManual == Keys.B) cmbPlayManual.SelectedIndex = 2;
            if (P.myPrefs.KeyPlayManual == Keys.C) cmbPlayManual.SelectedIndex = 3;
            if (P.myPrefs.KeyPlayManual == Keys.D) cmbPlayManual.SelectedIndex = 4;
            if (P.myPrefs.KeyPlayManual == Keys.E) cmbPlayManual.SelectedIndex = 5;
            if (P.myPrefs.KeyPlayManual == Keys.F) cmbPlayManual.SelectedIndex = 6;
            if (P.myPrefs.KeyPlayManual == Keys.G) cmbPlayManual.SelectedIndex = 7;
            if (P.myPrefs.KeyPlayManual == Keys.H) cmbPlayManual.SelectedIndex = 8;
            if (P.myPrefs.KeyPlayManual == Keys.I) cmbPlayManual.SelectedIndex = 9;
            if (P.myPrefs.KeyPlayManual == Keys.J) cmbPlayManual.SelectedIndex = 10;
            if (P.myPrefs.KeyPlayManual == Keys.K) cmbPlayManual.SelectedIndex = 11;
            if (P.myPrefs.KeyPlayManual == Keys.L) cmbPlayManual.SelectedIndex = 12;
            if (P.myPrefs.KeyPlayManual == Keys.M) cmbPlayManual.SelectedIndex = 13;
            if (P.myPrefs.KeyPlayManual == Keys.N) cmbPlayManual.SelectedIndex = 14;
            if (P.myPrefs.KeyPlayManual == Keys.O) cmbPlayManual.SelectedIndex = 15;
            if (P.myPrefs.KeyPlayManual == Keys.P) cmbPlayManual.SelectedIndex = 16;
            if (P.myPrefs.KeyPlayManual == Keys.Q) cmbPlayManual.SelectedIndex = 17;
            if (P.myPrefs.KeyPlayManual == Keys.R) cmbPlayManual.SelectedIndex = 18;
            if (P.myPrefs.KeyPlayManual == Keys.S) cmbPlayManual.SelectedIndex = 19;
            if (P.myPrefs.KeyPlayManual == Keys.T) cmbPlayManual.SelectedIndex = 20;
            if (P.myPrefs.KeyPlayManual == Keys.U) cmbPlayManual.SelectedIndex = 21;
            if (P.myPrefs.KeyPlayManual == Keys.V) cmbPlayManual.SelectedIndex = 22;
            if (P.myPrefs.KeyPlayManual == Keys.W) cmbPlayManual.SelectedIndex = 23;
            if (P.myPrefs.KeyPlayManual == Keys.X) cmbPlayManual.SelectedIndex = 24;
            if (P.myPrefs.KeyPlayManual == Keys.Y) cmbPlayManual.SelectedIndex = 25;
            if (P.myPrefs.KeyPlayManual == Keys.Z) cmbPlayManual.SelectedIndex = 26;
            //stop dispel
            if (P.myPrefs.KeyStopDispel == Keys.None) comboBox2.SelectedIndex = 0;
            if (P.myPrefs.KeyStopDispel == Keys.A) comboBox2.SelectedIndex  = 1;
            if (P.myPrefs.KeyStopDispel == Keys.B) comboBox2.SelectedIndex  = 2;
            if (P.myPrefs.KeyStopDispel == Keys.C) comboBox2.SelectedIndex  = 3;
            if (P.myPrefs.KeyStopDispel == Keys.D) comboBox2.SelectedIndex  = 4;
            if (P.myPrefs.KeyStopDispel == Keys.E) comboBox2.SelectedIndex  = 5;
            if (P.myPrefs.KeyStopDispel == Keys.F) comboBox2.SelectedIndex  = 6;
            if (P.myPrefs.KeyStopDispel == Keys.G) comboBox2.SelectedIndex  = 7;
            if (P.myPrefs.KeyStopDispel == Keys.H) comboBox2.SelectedIndex  = 8;
            if (P.myPrefs.KeyStopDispel == Keys.I) comboBox2.SelectedIndex  = 9;
            if (P.myPrefs.KeyStopDispel == Keys.J) comboBox2.SelectedIndex  = 10;
            if (P.myPrefs.KeyStopDispel == Keys.K) comboBox2.SelectedIndex  = 11;
            if (P.myPrefs.KeyStopDispel == Keys.L) comboBox2.SelectedIndex  = 12;
            if (P.myPrefs.KeyStopDispel == Keys.M) comboBox2.SelectedIndex  = 13;
            if (P.myPrefs.KeyStopDispel == Keys.N) comboBox2.SelectedIndex  = 14;
            if (P.myPrefs.KeyStopDispel == Keys.O) comboBox2.SelectedIndex  = 15;
            if (P.myPrefs.KeyStopDispel == Keys.P) comboBox2.SelectedIndex  = 16;
            if (P.myPrefs.KeyStopDispel == Keys.Q) comboBox2.SelectedIndex  = 17;
            if (P.myPrefs.KeyStopDispel == Keys.R) comboBox2.SelectedIndex  = 18;
            if (P.myPrefs.KeyStopDispel == Keys.S) comboBox2.SelectedIndex  = 19;
            if (P.myPrefs.KeyStopDispel == Keys.T) comboBox2.SelectedIndex  = 20;
            if (P.myPrefs.KeyStopDispel == Keys.U) comboBox2.SelectedIndex  = 21;
            if (P.myPrefs.KeyStopDispel == Keys.V) comboBox2.SelectedIndex  = 22;
            if (P.myPrefs.KeyStopDispel == Keys.W) comboBox2.SelectedIndex  = 23;
            if (P.myPrefs.KeyStopDispel == Keys.X) comboBox2.SelectedIndex  = 24;
            if (P.myPrefs.KeyStopDispel == Keys.Y) comboBox2.SelectedIndex  = 25;
            if (P.myPrefs.KeyStopDispel == Keys.Z) comboBox2.SelectedIndex  = 26;
            //stop purify
            if (P.myPrefs.KeyStopPurify == Keys.None) comboBox4.SelectedIndex = 0;
            if (P.myPrefs.KeyStopPurify == Keys.A) comboBox4.SelectedIndex = 1;
            if (P.myPrefs.KeyStopPurify == Keys.B) comboBox4.SelectedIndex = 2;
            if (P.myPrefs.KeyStopPurify == Keys.C) comboBox4.SelectedIndex = 3;
            if (P.myPrefs.KeyStopPurify == Keys.D) comboBox4.SelectedIndex = 4;
            if (P.myPrefs.KeyStopPurify == Keys.E) comboBox4.SelectedIndex = 5;
            if (P.myPrefs.KeyStopPurify == Keys.F) comboBox4.SelectedIndex = 6;
            if (P.myPrefs.KeyStopPurify == Keys.G) comboBox4.SelectedIndex = 7;
            if (P.myPrefs.KeyStopPurify == Keys.H) comboBox4.SelectedIndex = 8;
            if (P.myPrefs.KeyStopPurify == Keys.I) comboBox4.SelectedIndex = 9;
            if (P.myPrefs.KeyStopPurify == Keys.J) comboBox4.SelectedIndex = 10;
            if (P.myPrefs.KeyStopPurify == Keys.K) comboBox4.SelectedIndex = 11;
            if (P.myPrefs.KeyStopPurify == Keys.L) comboBox4.SelectedIndex = 12;
            if (P.myPrefs.KeyStopPurify == Keys.M) comboBox4.SelectedIndex = 13;
            if (P.myPrefs.KeyStopPurify == Keys.N) comboBox4.SelectedIndex = 14;
            if (P.myPrefs.KeyStopPurify == Keys.O) comboBox4.SelectedIndex = 15;
            if (P.myPrefs.KeyStopPurify == Keys.P) comboBox4.SelectedIndex = 16;
            if (P.myPrefs.KeyStopPurify == Keys.Q) comboBox4.SelectedIndex = 17;
            if (P.myPrefs.KeyStopPurify == Keys.R) comboBox4.SelectedIndex = 18;
            if (P.myPrefs.KeyStopPurify == Keys.S) comboBox4.SelectedIndex = 19;
            if (P.myPrefs.KeyStopPurify == Keys.T) comboBox4.SelectedIndex = 20;
            if (P.myPrefs.KeyStopPurify == Keys.U) comboBox4.SelectedIndex = 21;
            if (P.myPrefs.KeyStopPurify == Keys.V) comboBox4.SelectedIndex = 22;
            if (P.myPrefs.KeyStopPurify == Keys.W) comboBox4.SelectedIndex = 23;
            if (P.myPrefs.KeyStopPurify == Keys.X) comboBox4.SelectedIndex = 24;
            if (P.myPrefs.KeyStopPurify == Keys.Y) comboBox4.SelectedIndex = 25;
            if (P.myPrefs.KeyStopPurify == Keys.Z) comboBox4.SelectedIndex = 26;
            #endregion


        }

        private void button1_Click(object sender, EventArgs e)
        {
            P.myPrefs.Save();
            PD.myPrefs.Save();
            Close();
        }

        #region shadowstuff
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoMovement = checkBox1.Checked;
        }

        private void checkBox2_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoTargeting = checkBox2.Checked;
        }

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoFacing = checkBox3.Checked;
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoMovementDisable = checkBox4.Checked;
        }

        private void checkBox5_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoTargetingDisable = checkBox5.Checked;
        }

        private void checkBox6_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoFacingDisable = checkBox6.Checked;
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentPowerWordShield = (int)numericUpDown1.Value;
        }

        private void numericUpDown2_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentRenewCombat = (int)numericUpDown2.Value;
        }

        private void numericUpDown3_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.FoodHPOoC = (int)numericUpDown3.Value;
        }

        private void numericUpDown4_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.FoodManaOoC = (int)numericUpDown4.Value;
        }

        private void numericUpDown5_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentRenewOoC = (int)numericUpDown5.Value;
        }

        private void checkBox7_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.FlaskOraliusCrystal = checkBox7.Checked;
        }

        private void checkBox8_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.FlaskCrystal = checkBox8.Checked;
        }

        private void checkBox9_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.FlaskAlchemy = checkBox9.Checked;
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton1.Checked) P.myPrefs.Trinket1 = 1;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked) P.myPrefs.Trinket1 = 2;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton3.Checked) P.myPrefs.Trinket1 = 3;
        }

        private void numericUpDown10_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket1Energy = (int)numericUpDown10.Value;
        }

        private void numericUpDown11_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket1Mana = (int)numericUpDown11.Value;
        }

        private void numericUpDown6_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket1HP = (int)numericUpDown6.Value;
        }

        private void checkBox14_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.Trinket1Use = checkBox14.Checked;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton4.Checked) P.myPrefs.Trinket1 = 4;
        }

        private void radioButton5_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton5.Checked) P.myPrefs.Trinket1 = 5;
        }

        private void radioButton6_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton6.Checked) P.myPrefs.Trinket1 = 6;
        }

        private void radioButton12_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton12.Checked) P.myPrefs.Trinket2 = 1;
        }

        private void radioButton11_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton11.Checked) P.myPrefs.Trinket2 = 2;
        }

        private void radioButton10_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton10.Checked) P.myPrefs.Trinket2 = 3;
        }

        private void radioButton9_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton9.Checked) P.myPrefs.Trinket2 = 4;
        }

        private void radioButton8_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton8.Checked) P.myPrefs.Trinket2 = 5;
        }

        private void radioButton7_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton7.Checked) P.myPrefs.Trinket2 = 6;
        }

        private void checkBox10_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.Trinket2Use = checkBox10.Checked;
        }

        private void numericUpDown8_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket2Energy = (int)numericUpDown8.Value;
        }

        private void numericUpDown7_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket2Mana = (int)numericUpDown7.Value;
        }

        private void numericUpDown9_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentTrinket2HP = (int)numericUpDown9.Value;
        }
        #endregion

        #region modkeys
        private void cmbUseCooldownsModifier_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keySelect = cmbUseCooldownsModifier.SelectedIndex;
            switch (keySelect)
            {
                case 0: P.myPrefs.ModifkeyCooldowns = "Alt"; break;
                case 1: P.myPrefs.ModifkeyCooldowns = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyCooldowns = "Shift"; break;
                case 3: P.myPrefs.ModifkeyCooldowns = "Windows"; break;
            }
        }

        private void cmbPauseCRModifier_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keyselect = cmbPauseCRModifier.SelectedIndex;
            switch (keyselect)
            {
                case 0: P.myPrefs.ModifkeyPause = "Alt"; break;
                case 1: P.myPrefs.ModifkeyPause = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyPause = "Shift"; break;
                case 3: P.myPrefs.ModifkeyPause = "Windows"; break;
            }
        }

        private void cmbStopAoeModifier_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keyselect = cmbStopAoeModifier.SelectedIndex;
            switch (keyselect)
            {
                case 0: P.myPrefs.ModifkeyStopAoe = "Alt"; break;
                case 1: P.myPrefs.ModifkeyStopAoe = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyStopAoe = "Shift"; break;
                case 3: P.myPrefs.ModifkeyStopAoe = "Windows"; break;
            }
        }

        private void cmbPlayManualModifier_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keyselect = cmbPlayManualModifier.SelectedIndex;
            switch (keyselect)
            {
                case 0: P.myPrefs.ModifkeyPlayManual = "Alt"; break;
                case 1: P.myPrefs.ModifkeyPlayManual = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyPlayManual = "Shift"; break;
                case 3: P.myPrefs.ModifkeyPlayManual = "Windows"; break;
            }
        }
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keyselect = comboBox1.SelectedIndex;
            switch (keyselect)
            {
                case 0: P.myPrefs.ModifkeyStopDispel = "Alt"; break;
                case 1: P.myPrefs.ModifkeyStopDispel = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyStopDispel = "Shift"; break;
                case 3: P.myPrefs.ModifkeyStopDispel = "Windows"; break;
            }
        }
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            int keyselect = comboBox3.SelectedIndex;
            switch (keyselect)
            {
                case 0: P.myPrefs.ModifkeyStopPurify = "Alt"; break;
                case 1: P.myPrefs.ModifkeyStopPurify = "Ctrl"; break;
                case 2: P.myPrefs.ModifkeyStopPurify = "Shift"; break;
                case 3: P.myPrefs.ModifkeyStopPurify = "Windows"; break;
            }
        }
        #endregion

        #region hotkeys
        private void cmbUseCooldowns_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbUseCooldowns.SelectedIndex == 0) P.myPrefs.KeyUseCooldowns = Keys.None;
            if (cmbUseCooldowns.SelectedIndex == 1) P.myPrefs.KeyUseCooldowns = Keys.A;
            if (cmbUseCooldowns.SelectedIndex == 2) P.myPrefs.KeyUseCooldowns = Keys.B;
            if (cmbUseCooldowns.SelectedIndex == 3) P.myPrefs.KeyUseCooldowns = Keys.C;
            if (cmbUseCooldowns.SelectedIndex == 4) P.myPrefs.KeyUseCooldowns = Keys.D;
            if (cmbUseCooldowns.SelectedIndex == 5) P.myPrefs.KeyUseCooldowns = Keys.E;
            if (cmbUseCooldowns.SelectedIndex == 6) P.myPrefs.KeyUseCooldowns = Keys.F;
            if (cmbUseCooldowns.SelectedIndex == 7) P.myPrefs.KeyUseCooldowns = Keys.G;
            if (cmbUseCooldowns.SelectedIndex == 8) P.myPrefs.KeyUseCooldowns = Keys.H;
            if (cmbUseCooldowns.SelectedIndex == 9) P.myPrefs.KeyUseCooldowns = Keys.I;
            if (cmbUseCooldowns.SelectedIndex == 10) P.myPrefs.KeyUseCooldowns = Keys.J;
            if (cmbUseCooldowns.SelectedIndex == 11) P.myPrefs.KeyUseCooldowns = Keys.K;
            if (cmbUseCooldowns.SelectedIndex == 12) P.myPrefs.KeyUseCooldowns = Keys.L;
            if (cmbUseCooldowns.SelectedIndex == 13) P.myPrefs.KeyUseCooldowns = Keys.M;
            if (cmbUseCooldowns.SelectedIndex == 14) P.myPrefs.KeyUseCooldowns = Keys.N;
            if (cmbUseCooldowns.SelectedIndex == 15) P.myPrefs.KeyUseCooldowns = Keys.O;
            if (cmbUseCooldowns.SelectedIndex == 16) P.myPrefs.KeyUseCooldowns = Keys.P;
            if (cmbUseCooldowns.SelectedIndex == 17) P.myPrefs.KeyUseCooldowns = Keys.Q;
            if (cmbUseCooldowns.SelectedIndex == 18) P.myPrefs.KeyUseCooldowns = Keys.R;
            if (cmbUseCooldowns.SelectedIndex == 19) P.myPrefs.KeyUseCooldowns = Keys.S;
            if (cmbUseCooldowns.SelectedIndex == 20) P.myPrefs.KeyUseCooldowns = Keys.T;
            if (cmbUseCooldowns.SelectedIndex == 21) P.myPrefs.KeyUseCooldowns = Keys.U;
            if (cmbUseCooldowns.SelectedIndex == 22) P.myPrefs.KeyUseCooldowns = Keys.V;
            if (cmbUseCooldowns.SelectedIndex == 23) P.myPrefs.KeyUseCooldowns = Keys.W;
            if (cmbUseCooldowns.SelectedIndex == 24) P.myPrefs.KeyUseCooldowns = Keys.X;
            if (cmbUseCooldowns.SelectedIndex == 25) P.myPrefs.KeyUseCooldowns = Keys.Y;
            if (cmbUseCooldowns.SelectedIndex == 26) P.myPrefs.KeyUseCooldowns = Keys.Z;
        }

        private void cmbPauseCR_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbPauseCR.SelectedIndex == 0) P.myPrefs.KeyPauseCR = Keys.None;
            if (cmbPauseCR.SelectedIndex == 1) P.myPrefs.KeyPauseCR = Keys.A;
            if (cmbPauseCR.SelectedIndex == 2) P.myPrefs.KeyPauseCR = Keys.B;
            if (cmbPauseCR.SelectedIndex == 3) P.myPrefs.KeyPauseCR = Keys.C;
            if (cmbPauseCR.SelectedIndex == 4) P.myPrefs.KeyPauseCR = Keys.D;
            if (cmbPauseCR.SelectedIndex == 5) P.myPrefs.KeyPauseCR = Keys.E;
            if (cmbPauseCR.SelectedIndex == 6) P.myPrefs.KeyPauseCR = Keys.F;
            if (cmbPauseCR.SelectedIndex == 7) P.myPrefs.KeyPauseCR = Keys.G;
            if (cmbPauseCR.SelectedIndex == 8) P.myPrefs.KeyPauseCR = Keys.H;
            if (cmbPauseCR.SelectedIndex == 9) P.myPrefs.KeyPauseCR = Keys.I;
            if (cmbPauseCR.SelectedIndex == 10) P.myPrefs.KeyPauseCR = Keys.J;
            if (cmbPauseCR.SelectedIndex == 11) P.myPrefs.KeyPauseCR = Keys.K;
            if (cmbPauseCR.SelectedIndex == 12) P.myPrefs.KeyPauseCR = Keys.L;
            if (cmbPauseCR.SelectedIndex == 13) P.myPrefs.KeyPauseCR = Keys.M;
            if (cmbPauseCR.SelectedIndex == 14) P.myPrefs.KeyPauseCR = Keys.N;
            if (cmbPauseCR.SelectedIndex == 15) P.myPrefs.KeyPauseCR = Keys.O;
            if (cmbPauseCR.SelectedIndex == 16) P.myPrefs.KeyPauseCR = Keys.P;
            if (cmbPauseCR.SelectedIndex == 17) P.myPrefs.KeyPauseCR = Keys.Q;
            if (cmbPauseCR.SelectedIndex == 18) P.myPrefs.KeyPauseCR = Keys.R;
            if (cmbPauseCR.SelectedIndex == 19) P.myPrefs.KeyPauseCR = Keys.S;
            if (cmbPauseCR.SelectedIndex == 20) P.myPrefs.KeyPauseCR = Keys.T;
            if (cmbPauseCR.SelectedIndex == 21) P.myPrefs.KeyPauseCR = Keys.U;
            if (cmbPauseCR.SelectedIndex == 22) P.myPrefs.KeyPauseCR = Keys.V;
            if (cmbPauseCR.SelectedIndex == 23) P.myPrefs.KeyPauseCR = Keys.W;
            if (cmbPauseCR.SelectedIndex == 24) P.myPrefs.KeyPauseCR = Keys.X;
            if (cmbPauseCR.SelectedIndex == 25) P.myPrefs.KeyPauseCR = Keys.Y;
            if (cmbPauseCR.SelectedIndex == 26) P.myPrefs.KeyPauseCR = Keys.Z;
        }

        private void cmbStopAoe_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbStopAoe.SelectedIndex == 0) P.myPrefs.KeyStopAoe = Keys.None;
            if (cmbStopAoe.SelectedIndex == 1) P.myPrefs.KeyStopAoe = Keys.A;
            if (cmbStopAoe.SelectedIndex == 2) P.myPrefs.KeyStopAoe = Keys.B;
            if (cmbStopAoe.SelectedIndex == 3) P.myPrefs.KeyStopAoe = Keys.C;
            if (cmbStopAoe.SelectedIndex == 4) P.myPrefs.KeyStopAoe = Keys.D;
            if (cmbStopAoe.SelectedIndex == 5) P.myPrefs.KeyStopAoe = Keys.E;
            if (cmbStopAoe.SelectedIndex == 6) P.myPrefs.KeyStopAoe = Keys.F;
            if (cmbStopAoe.SelectedIndex == 7) P.myPrefs.KeyStopAoe = Keys.G;
            if (cmbStopAoe.SelectedIndex == 8) P.myPrefs.KeyStopAoe = Keys.H;
            if (cmbStopAoe.SelectedIndex == 9) P.myPrefs.KeyStopAoe = Keys.I;
            if (cmbStopAoe.SelectedIndex == 10) P.myPrefs.KeyStopAoe = Keys.J;
            if (cmbStopAoe.SelectedIndex == 11) P.myPrefs.KeyStopAoe = Keys.K;
            if (cmbStopAoe.SelectedIndex == 12) P.myPrefs.KeyStopAoe = Keys.L;
            if (cmbStopAoe.SelectedIndex == 13) P.myPrefs.KeyStopAoe = Keys.M;
            if (cmbStopAoe.SelectedIndex == 14) P.myPrefs.KeyStopAoe = Keys.N;
            if (cmbStopAoe.SelectedIndex == 15) P.myPrefs.KeyStopAoe = Keys.O;
            if (cmbStopAoe.SelectedIndex == 16) P.myPrefs.KeyStopAoe = Keys.P;
            if (cmbStopAoe.SelectedIndex == 17) P.myPrefs.KeyStopAoe = Keys.Q;
            if (cmbStopAoe.SelectedIndex == 18) P.myPrefs.KeyStopAoe = Keys.R;
            if (cmbStopAoe.SelectedIndex == 19) P.myPrefs.KeyStopAoe = Keys.S;
            if (cmbStopAoe.SelectedIndex == 20) P.myPrefs.KeyStopAoe = Keys.T;
            if (cmbStopAoe.SelectedIndex == 21) P.myPrefs.KeyStopAoe = Keys.U;
            if (cmbStopAoe.SelectedIndex == 22) P.myPrefs.KeyStopAoe = Keys.V;
            if (cmbStopAoe.SelectedIndex == 23) P.myPrefs.KeyStopAoe = Keys.W;
            if (cmbStopAoe.SelectedIndex == 24) P.myPrefs.KeyStopAoe = Keys.X;
            if (cmbStopAoe.SelectedIndex == 25) P.myPrefs.KeyStopAoe = Keys.Y;
            if (cmbStopAoe.SelectedIndex == 26) P.myPrefs.KeyStopAoe = Keys.Z;
        }

        private void cmbPlayManual_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbPlayManual.SelectedIndex == 0) P.myPrefs.KeyPlayManual = Keys.None;
            if (cmbPlayManual.SelectedIndex == 1) P.myPrefs.KeyPlayManual = Keys.A;
            if (cmbPlayManual.SelectedIndex == 2) P.myPrefs.KeyPlayManual = Keys.B;
            if (cmbPlayManual.SelectedIndex == 3) P.myPrefs.KeyPlayManual = Keys.C;
            if (cmbPlayManual.SelectedIndex == 4) P.myPrefs.KeyPlayManual = Keys.D;
            if (cmbPlayManual.SelectedIndex == 5) P.myPrefs.KeyPlayManual = Keys.E;
            if (cmbPlayManual.SelectedIndex == 6) P.myPrefs.KeyPlayManual = Keys.F;
            if (cmbPlayManual.SelectedIndex == 7) P.myPrefs.KeyPlayManual = Keys.G;
            if (cmbPlayManual.SelectedIndex == 8) P.myPrefs.KeyPlayManual = Keys.H;
            if (cmbPlayManual.SelectedIndex == 9) P.myPrefs.KeyPlayManual = Keys.I;
            if (cmbPlayManual.SelectedIndex == 10) P.myPrefs.KeyPlayManual = Keys.J;
            if (cmbPlayManual.SelectedIndex == 11) P.myPrefs.KeyPlayManual = Keys.K;
            if (cmbPlayManual.SelectedIndex == 12) P.myPrefs.KeyPlayManual = Keys.L;
            if (cmbPlayManual.SelectedIndex == 13) P.myPrefs.KeyPlayManual = Keys.M;
            if (cmbPlayManual.SelectedIndex == 14) P.myPrefs.KeyPlayManual = Keys.N;
            if (cmbPlayManual.SelectedIndex == 15) P.myPrefs.KeyPlayManual = Keys.O;
            if (cmbPlayManual.SelectedIndex == 16) P.myPrefs.KeyPlayManual = Keys.P;
            if (cmbPlayManual.SelectedIndex == 17) P.myPrefs.KeyPlayManual = Keys.Q;
            if (cmbPlayManual.SelectedIndex == 18) P.myPrefs.KeyPlayManual = Keys.R;
            if (cmbPlayManual.SelectedIndex == 19) P.myPrefs.KeyPlayManual = Keys.S;
            if (cmbPlayManual.SelectedIndex == 20) P.myPrefs.KeyPlayManual = Keys.T;
            if (cmbPlayManual.SelectedIndex == 21) P.myPrefs.KeyPlayManual = Keys.U;
            if (cmbPlayManual.SelectedIndex == 22) P.myPrefs.KeyPlayManual = Keys.V;
            if (cmbPlayManual.SelectedIndex == 23) P.myPrefs.KeyPlayManual = Keys.W;
            if (cmbPlayManual.SelectedIndex == 24) P.myPrefs.KeyPlayManual = Keys.X;
            if (cmbPlayManual.SelectedIndex == 25) P.myPrefs.KeyPlayManual = Keys.Y;
            if (cmbPlayManual.SelectedIndex == 26) P.myPrefs.KeyPlayManual = Keys.Z;
        }
        

        private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox2.SelectedIndex == 0) P.myPrefs.KeyStopDispel = Keys.None;
            if (comboBox2.SelectedIndex == 1) P.myPrefs.KeyStopDispel = Keys.A;
            if (comboBox2.SelectedIndex == 2) P.myPrefs.KeyStopDispel = Keys.B;
            if (comboBox2.SelectedIndex == 3) P.myPrefs.KeyStopDispel = Keys.C;
            if (comboBox2.SelectedIndex == 4) P.myPrefs.KeyStopDispel = Keys.D;
            if (comboBox2.SelectedIndex == 5) P.myPrefs.KeyStopDispel = Keys.E;
            if (comboBox2.SelectedIndex == 6) P.myPrefs.KeyStopDispel = Keys.F;
            if (comboBox2.SelectedIndex == 7) P.myPrefs.KeyStopDispel = Keys.G;
            if (comboBox2.SelectedIndex == 8) P.myPrefs.KeyStopDispel = Keys.H;
            if (comboBox2.SelectedIndex == 9) P.myPrefs.KeyStopDispel = Keys.I;
            if (comboBox2.SelectedIndex == 10) P.myPrefs.KeyStopDispel = Keys.J;
            if (comboBox2.SelectedIndex == 11) P.myPrefs.KeyStopDispel = Keys.K;
            if (comboBox2.SelectedIndex == 12) P.myPrefs.KeyStopDispel = Keys.L;
            if (comboBox2.SelectedIndex == 13) P.myPrefs.KeyStopDispel = Keys.M;
            if (comboBox2.SelectedIndex == 14) P.myPrefs.KeyStopDispel = Keys.N;
            if (comboBox2.SelectedIndex == 15) P.myPrefs.KeyStopDispel = Keys.O;
            if (comboBox2.SelectedIndex == 16) P.myPrefs.KeyStopDispel = Keys.P;
            if (comboBox2.SelectedIndex == 17) P.myPrefs.KeyStopDispel = Keys.Q;
            if (comboBox2.SelectedIndex == 18) P.myPrefs.KeyStopDispel = Keys.R;
            if (comboBox2.SelectedIndex == 19) P.myPrefs.KeyStopDispel = Keys.S;
            if (comboBox2.SelectedIndex == 20) P.myPrefs.KeyStopDispel = Keys.T;
            if (comboBox2.SelectedIndex == 21) P.myPrefs.KeyStopDispel = Keys.U;
            if (comboBox2.SelectedIndex == 22) P.myPrefs.KeyStopDispel = Keys.V;
            if (comboBox2.SelectedIndex == 23) P.myPrefs.KeyStopDispel = Keys.W;
            if (comboBox2.SelectedIndex == 24) P.myPrefs.KeyStopDispel = Keys.X;
            if (comboBox2.SelectedIndex == 25) P.myPrefs.KeyStopDispel = Keys.Y;
            if (comboBox2.SelectedIndex == 26) P.myPrefs.KeyStopDispel = Keys.Z;
        }

        private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox4.SelectedIndex == 0) P.myPrefs.KeyStopPurify = Keys.None;
            if (comboBox4.SelectedIndex == 1) P.myPrefs.KeyStopPurify = Keys.A;
            if (comboBox4.SelectedIndex == 2) P.myPrefs.KeyStopPurify = Keys.B;
            if (comboBox4.SelectedIndex == 3) P.myPrefs.KeyStopPurify = Keys.C;
            if (comboBox4.SelectedIndex == 4) P.myPrefs.KeyStopPurify = Keys.D;
            if (comboBox4.SelectedIndex == 5) P.myPrefs.KeyStopPurify = Keys.E;
            if (comboBox4.SelectedIndex == 6) P.myPrefs.KeyStopPurify = Keys.F;
            if (comboBox4.SelectedIndex == 7) P.myPrefs.KeyStopPurify = Keys.G;
            if (comboBox4.SelectedIndex == 8) P.myPrefs.KeyStopPurify = Keys.H;
            if (comboBox4.SelectedIndex == 9) P.myPrefs.KeyStopPurify = Keys.I;
            if (comboBox4.SelectedIndex == 10) P.myPrefs.KeyStopPurify = Keys.J;
            if (comboBox4.SelectedIndex == 11) P.myPrefs.KeyStopPurify = Keys.K;
            if (comboBox4.SelectedIndex == 12) P.myPrefs.KeyStopPurify = Keys.L;
            if (comboBox4.SelectedIndex == 13) P.myPrefs.KeyStopPurify = Keys.M;
            if (comboBox4.SelectedIndex == 14) P.myPrefs.KeyStopPurify = Keys.N;
            if (comboBox4.SelectedIndex == 15) P.myPrefs.KeyStopPurify = Keys.O;
            if (comboBox4.SelectedIndex == 16) P.myPrefs.KeyStopPurify = Keys.P;
            if (comboBox4.SelectedIndex == 17) P.myPrefs.KeyStopPurify = Keys.Q;
            if (comboBox4.SelectedIndex == 18) P.myPrefs.KeyStopPurify = Keys.R;
            if (comboBox4.SelectedIndex == 19) P.myPrefs.KeyStopPurify = Keys.S;
            if (comboBox4.SelectedIndex == 20) P.myPrefs.KeyStopPurify = Keys.T;
            if (comboBox4.SelectedIndex == 21) P.myPrefs.KeyStopPurify = Keys.U;
            if (comboBox4.SelectedIndex == 22) P.myPrefs.KeyStopPurify = Keys.V;
            if (comboBox4.SelectedIndex == 23) P.myPrefs.KeyStopPurify = Keys.W;
            if (comboBox4.SelectedIndex == 24) P.myPrefs.KeyStopPurify = Keys.X;
            if (comboBox4.SelectedIndex == 25) P.myPrefs.KeyStopPurify = Keys.Y;
            if (comboBox4.SelectedIndex == 26) P.myPrefs.KeyStopPurify = Keys.Z;
        }
        #endregion

        #region shadowstuff more
        private void checkBox11_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.PrintRaidstyleMsg = checkBox11.Checked;
        }

        private void numericUpDown12_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.MindSearAdds = (int)numericUpDown12.Value;
        }

        private void checkBox12_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoInterrupt = checkBox12.Checked;
        }

        private void numericUpDown13_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentFlashHealOoC = (int)numericUpDown13.Value;
        }

        private void numericUpDown14_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentFlashHealCombat = (int)numericUpDown14.Value;
        }

        private void checkBox13_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.FiendAsDps = checkBox13.Checked;
        }

        private void checkBox15_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.FiendAsMana = checkBox15.Checked;
        }

        private void numericUpDown15_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentFiendMana = (int)numericUpDown15.Value;
        }

        private void numericUpDown19_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentNaaru = (int)numericUpDown19.Value;
        }

        private void numericUpDown16_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.HaloAdds = (int)numericUpDown16.Value;
        }

        private void numericUpDown17_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.DivineStarAdds = (int)numericUpDown17.Value;
        }

        private void numericUpDown18_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.CascadeAdds = (int)numericUpDown18.Value;
        }

        private void numericUpDown20_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentVampiricEmbrace = (int)numericUpDown20.Value;
        }

        private void numericUpDown21_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.VoidTendrilAdds = (int)numericUpDown21.Value;
        }

        private void numericUpDown22_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PsychicScreamAdds = (int)numericUpDown22.Value;
        }

        private void checkBox16_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoDispel = checkBox16.Checked;
        }

        private void numericUpDown23_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentDispersion = (int)numericUpDown23.Value;
        }

        private void numericUpDown24_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentDesperatePrayer = (int)numericUpDown24.Value;
        }
        #endregion

        private void checkBox17_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.keepRenewOnTanks500 = checkBox17.Checked;
        }

        private void checkBox18_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.keepRenewOnTanks510 = checkBox18.Checked;
        }

        private void checkBox19_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.keepRenewOnTanks520 = checkBox19.Checked;
        }

        private void numericUpDown27_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentRenew500 = (int)numericUpDown27.Value;
        }

        private void numericUpDown28_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentRenew510 = (int)numericUpDown28.Value;
        }

        private void numericUpDown29_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentRenew520 = (int)numericUpDown29.Value;
        }

        private void btnChakraSernenity500_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSernenity500.Checked) P.myPrefs.buttonChakraSernenity500 = true; P.myPrefs.buttonChakraSanctuary500 = false;
        }

        private void btnChakraSanctuary500_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSanctuary500.Checked) P.myPrefs.buttonChakraSanctuary500 = true; P.myPrefs.buttonChakraSernenity500 = false;
        }

        private void btnChakraSernenity510_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSernenity510.Checked) P.myPrefs.buttonChakraSernenity510 = true; P.myPrefs.buttonChakraSanctuary510 = false;
        }

        private void btnChakraSanctuary510_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSanctuary510.Checked) P.myPrefs.buttonChakraSanctuary510 = true; P.myPrefs.buttonChakraSernenity510 = false;
        }

        private void btnChakraSernenity520_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSernenity520.Checked) P.myPrefs.buttonChakraSernenity520 = true; P.myPrefs.buttonChakraSanctuary520 = false;
        }

        private void btnChakraSanctuary520_CheckedChanged(object sender, EventArgs e)
        {
            if (btnChakraSanctuary520.Checked) P.myPrefs.buttonChakraSanctuary520 = true; P.myPrefs.buttonChakraSernenity520 = false;
        }

        private void btnMindbender500_CheckedChanged(object sender, EventArgs e)
        {
            if (btnMindbender500.Checked) P.myPrefs.buttonMindbender500 = true;
        }

        private void btnMindbender510_CheckedChanged(object sender, EventArgs e)
        {
            if (btnMindbender510.Checked) P.myPrefs.buttonMindbender510 = true;
        }

        private void btnMindbender520_CheckedChanged(object sender, EventArgs e)
        {
            if (btnMindbender520.Checked) P.myPrefs.buttonMindbender520 = true;
        }

        private void numericUpDown30_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentManaMindbender500 = (int)numericUpDown30.Value;
        }

        private void numericUpDown31_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentManaMindbender510 = (int)numericUpDown31.Value;
        }

        private void numericUpDown32_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentManaMindbender520 = (int)numericUpDown32.Value;
        }

        private void numericUpDown33_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentBindingHeal500 = (int)numericUpDown33.Value;
        }

        private void numericUpDown34_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentBindingHeal510 = (int)numericUpDown34.Value;
        }

        private void numericUpDown35_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentBindingHeal520 = (int)numericUpDown35.Value;
        }

        private void numericUpDown36_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfMending500 = (int)numericUpDown36.Value;
        }

        private void numericUpDown37_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfMending510 = (int)numericUpDown37.Value;
        }

        private void numericUpDown38_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfMending520 = (int)numericUpDown38.Value;
        }

        private void numericUpDown39_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentHeal500 = (int)numericUpDown39.Value;
        }

        private void numericUpDown40_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentHeal510 = (int)numericUpDown40.Value;
        }

        private void numericUpDown41_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentHeal520 = (int)numericUpDown41.Value;
        }

        private void numericUpDown42_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentFlashHeal500 = (int)numericUpDown42.Value;
        }

        private void numericUpDown43_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentFlashHeal510 = (int)numericUpDown43.Value;
        }

        private void numericUpDown44_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentFlashHeal520 = (int)numericUpDown44.Value;
        }

        private void numericUpDown25_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentCircleOfHealing500 = (int)numericUpDown25.Value;
        }

        private void numericUpDown26_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentCircleOfHealing510 = (int)numericUpDown26.Value;
        }

        private void numericUpDown45_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentCircleOfHealing520 = (int)numericUpDown45.Value;
        }

        private void numericUpDown46_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.CircleOfHealingPlayers500 = (int)numericUpDown46.Value;
        }

        private void numericUpDown47_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.CircleOfHealingPlayers510 = (int)numericUpDown47.Value;
        }

        private void numericUpDown48_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.CircleOfHealingPlayers520 = (int)numericUpDown48.Value;
        }

        private void numericUpDown49_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfHealing500 = (int)numericUpDown49.Value;
        }

        private void numericUpDown50_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfHealing510 = (int)numericUpDown50.Value;
        }

        private void numericUpDown51_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentPrayerOfHealing520 = (int)numericUpDown51.Value;
        }

        private void numericUpDown52_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PrayerOfHealingPlayers500 = (int)numericUpDown52.Value;
        }

        private void numericUpDown53_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PrayerOfHealingPlayers510 = (int)numericUpDown53.Value;
        }

        private void numericUpDown54_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PrayerOfHealingPlayers520 = (int)numericUpDown54.Value;
        }

        private void numericUpDown55_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentDivineHymn500 = (int)numericUpDown55.Value;
        }

        private void numericUpDown56_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentDivineHymn510 = (int)numericUpDown56.Value;
        }

        private void numericUpDown57_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentDivineHymn520 = (int)numericUpDown57.Value;
        }

        private void numericUpDown58_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.DivineHymnPlayers500 = (int)numericUpDown58.Value;
        }

        private void numericUpDown59_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.DivineHymnPlayers510 = (int)numericUpDown59.Value;
        }

        private void numericUpDown60_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.DivineHymnPlayers520 = (int)numericUpDown60.Value;
        }

        private void checkBox20_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoGuardianOnTank = checkBox20.Checked;
        }

        private void numericUpDown61_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.percentGuardianSpiritTank = (int)numericUpDown61.Value;
        }

        private void checkBox21_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoHolyDispel = checkBox21.Checked;
        }

        private void checkBox22_CheckedChanged(object sender, EventArgs e)
        {
            P.myPrefs.AutoHolyPurify = checkBox22.Checked;
        }

        private void numericUpDown62_ValueChanged(object sender, EventArgs e)
        {
            P.myPrefs.PercentSolace = (int)numericUpDown62.Value;
        }

        private void btnAtonementNo_CheckedChanged(object sender, EventArgs e)
        {
            if (btnAtonementNo.Checked) PD.myPrefs.UseAtonement = 0;
        }

        private void btnAtonementYes_CheckedChanged(object sender, EventArgs e)
        {
            if (btnAtonementYes.Checked) PD.myPrefs.UseAtonement = 1;
        }

        private void numericUpDown63_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.UseAtonementManaPercent = (int)numericUpDown63.Value;
        }

        private void numericUpDown64_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PwsTanks = (int)numericUpDown64.Value;
        }

        private void numericUpDown65_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PwsHealers = (int)numericUpDown65.Value;
        }

        private void numericUpDown66_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PwsDamage = (int)numericUpDown66.Value;
        }

        private void numericUpDown69_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PenanceTanks = (int)numericUpDown69.Value;
        }

        private void numericUpDown68_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PenanceHealers = (int)numericUpDown68.Value;
        }

        private void numericUpDown67_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PenanceDamage = (int)numericUpDown67.Value;
        }

        private void numericUpDown72_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.MendingTanks = (int)numericUpDown72.Value;
        }

        private void numericUpDown71_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.MendingHealers = (int)numericUpDown71.Value;
        }

        private void numericUpDown70_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.MendingDamage = (int)numericUpDown70.Value;
        }

        private void numericUpDown73_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PrayerOfHealingPercent = (int)numericUpDown73.Value;
        }

        private void numericUpDown74_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PrayerOfHealingPlayerCount = (int)numericUpDown74.Value;
        }

        private void checkBox23_CheckedChanged(object sender, EventArgs e)
        {
            PD.myPrefs.BarrierAutoUse = checkBox23.Checked;
        }

        private void numericUpDown75_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.BarrierPercent = (int)numericUpDown75.Value;
        }

        private void numericUpDown76_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.BarrierPlayerCount = (int)numericUpDown76.Value;
        }

        private void checkBox24_CheckedChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PainAutoUse = checkBox24.Checked;
        }

        private void numericUpDown77_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PainPercent = (int)numericUpDown77.Value;
        }

        private void numericUpDown78_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.HolyNovaPercent = (int)numericUpDown78.Value;
        }

        private void numericUpDown79_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.HolyNovaPlayerCount = (int)numericUpDown79.Value;
        }

        private void radioButton14_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton14.Checked) PD.myPrefs.ManaRegen = 0;
        }

        private void radioButton13_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton13.Checked) PD.myPrefs.ManaRegen = 1;
        }

        private void radioButton15_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton15.Checked) PD.myPrefs.ManaRegen = 2;
        }

        private void numericUpDown80_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.ManaRegenPercent = (int)numericUpDown80.Value;
        }

        private void numericUpDown81_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.HealTanks = (int)numericUpDown81.Value;
        }

        private void numericUpDown82_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.HealHealers = (int)numericUpDown82.Value;
        }

        private void numericUpDown83_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.HealDamage = (int)numericUpDown83.Value;
        }

        private void numericUpDown84_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.FlashHealTanks = (int)numericUpDown84.Value;
        }

        private void numericUpDown85_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.FlashHealHealers = (int)numericUpDown85.Value;
        }

        private void numericUpDown86_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.FlashHealDamage = (int)numericUpDown86.Value;
        }

        private void numericUpDown87_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.ArchangelStacks = (int)numericUpDown87.Value;
        }

        private void numericUpDown88_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.CascadeHealth = (int)numericUpDown88.Value;
        }

        private void numericUpDown89_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.CascadePlayerCount = (int)numericUpDown89.Value;
        }

        private void checkBox25_CheckedChanged(object sender, EventArgs e)
        {
            PD.myPrefs.AutoDispel = checkBox25.Checked;
        }

        private void checkBox26_CheckedChanged(object sender, EventArgs e)
        {
            PD.myPrefs.AutoPurify = checkBox26.Checked;
        }

        private void checkBox28_CheckedChanged(object sender, EventArgs e)
        {
            PD.myPrefs.PenanceHealingOnly = checkBox28.Checked;
        }

        private void numericUpDown90_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.DesperatePrayerPercent = (int)numericUpDown90.Value;
        }

        private void numericUpDown91_ValueChanged(object sender, EventArgs e)
        {
            PD.myPrefs.GiftOfTheNaaruPercent = (int)numericUpDown91.Value;
        }

        

        
    }
}
